package com.boshanam.service.user;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.security.userdetails.UserDetailsService;

import com.boshanam.exceptions.domain.user.EmailIdAlreadyRegisteredException;
import com.boshanam.exceptions.domain.user.InvalidUserException;
import com.boshanam.exceptions.domain.user.UserAlreadyExistException;
import com.boshanam.exceptions.domain.user.UserNameAlreadyExistsException;
import com.boshanam.exceptions.domain.user.UserNotExistException;
import com.boshanam.model.vos.domain.user.UserVO;
import com.boshanam.model.vos.domain.user.UserVOImmutable;

/**
 * This interface extends UserDetailsService so that it can directly support
 * 
 * 
 * @author Sivakumar Y IUserService.java Dec 15, 2009 4:21:43 PM www.ibigbang.net
 */
public interface IUserService extends UserDetailsService {

	public void createUser(UserVO user) throws InvalidUserException,
			UserAlreadyExistException, DataAccessException,
			UserNameAlreadyExistsException, EmailIdAlreadyRegisteredException;

	public UserVO updateUser(UserVO user) throws InvalidUserException,
			DataAccessException;

	public void deleteUser(UserVO user) throws InvalidUserException,
			UserNotExistException, DataAccessException;

	public void deleteUserByUserId(UserVO userId) throws InvalidUserException,
			UserNotExistException, DataAccessException;

	public void deleteUserByEmail(String emailId) throws InvalidUserException,
			UserNotExistException, DataAccessException;

	List<UserVOImmutable> getAllUsers(int max) throws DataAccessException;

	List<UserVOImmutable> getAllUsers() throws DataAccessException;
	
	public UserVOImmutable loadUserByEmail(String emailId) throws UserNotExistException,
			DataAccessException;

}
